package cn.net.isir.controller.callback;

import org.apache.log4j.Logger;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author liuxubo
 * @filename AlipayMinipGateway.java
 * @package cn.net.isir.controller.callback.alipay
 * @email lxb@isir.net.cn
 * @date 2019/01/15
 * @comment
 * @since 1.8
 */
@RestController
@RequestMapping("/alipay")
public class Alipay {
    //声明日志对象
    private static Logger logger = Logger.getLogger(Alipay.class);

    /**
     * 通知网关（支付宝用）
     *
     * @param request  请求
     * @param response 响应
     */
    @RequestMapping(value = "/gateway")
    public void Gateway(HttpServletRequest request, HttpServletResponse response) {
        for (String key : request.getParameterMap().keySet()) {
            logger.info("key" + key);
        }
        request.getParameterMap();

        logger.info(request.getParameterMap());
    }
}
